<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=emulateIE7" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <link rel="stylesheet" href="/static/base/common/css/sapar.css" />
    <link rel="stylesheet" type="text/css" href="/static/base/common/css/common.css" />
    <link rel="stylesheet" type="text/css" href="/static/webjars/layui/css/layui.css"/>
    <script type="text/javascript" src="/static/base/common/js/jquery.js"></script>
    <script type="text/javascript" src="/static/base/common/js/sapar.js"></script>
    <title>网格员详情</title>
    <style>
        #mapContainer{height:600px}
        <%--百度地图取消显示logo--%>
        .BMap_cpyCtrl {display: none;}
        .anchorBL {display: none;}
        .search{
            padding:15px 10px;
        }
        .search button{
            background-color:rgb(59,159,225);
        }
    </style>
</head>

<body>
<div id="saper-container">
    <div id="saper-hd">
    </div>
    <div id="saper-bd">
        <div class="subfiled clearfix">
            <h2>网格员上报详情</h2>
        </div>
        <table id="evaluate" lay-filter="data"></table>
    </div>
    <div id="saper-ft"></div>
</div>
</body>
<script type="text/javascript" src="/static/webjars/layui/layui.all.js"></script>
<script type="text/javascript">

    layui.use('table',function(){
        var table = layui.table;
        //加载数据
        table.render({
            elem: '#evaluate'
            ,height: 'full-200'
            ,url: '/ajax/commandajax/scatter_detail?id=${id}' //数据接口
            ,page: true //开启分页
            ,cols: [[ //表头
                { title: 'ID',width:80,sort: true, fixed: 'left',templet:function(d){
                        return d.ctReport.id;
                    }}
                ,{title: '上报人',width:100,sort:true,templet:function(d){
                        if(d.reportName === undefined || d.reportName === null){
                            return "未分配";
                        }
                        return d.reportName;
                    }}
                ,{title: '报备时间',width:150,sort:true,templet:function(d){
                        var date = new Date(Number(d.ctReport.createTime));

                        var year = date.getFullYear(),
                            month = date.getMonth() + 1,//月份是从0开始的
                            day = date.getDate(),
                            hour = date.getHours(),
                            min = date.getMinutes(),
                            sec = date.getSeconds();
                        var newTime = year + '-' +
                            month + '-' +
                            day + ' ' +
                            hour + ':' +
                            min + ':' +
                            sec;
                        return newTime;
                    }}
                ,{title: '受理部门',width:300,templet:function(d){
                        return d.branchName;
                    }}
                ,{title: '案件内容',templet:function(d){
                        return d.ctReport.content;
                    }}
                ,{title:'复查员',width:178,templet:function(d){
                        return d.checkManName;
                    }}
                ,{title:'上报地区',templet:function(d){
                        if(d.townName === undefined || d.villageName === undefined){
                            return "未知地区";
                        }
                        return d.townName+"-"+d.villageName;
                    }}
            ]]
            ,id: 'reload'
            ,page: true
            ,height:  'full-200'
        });

    });
</script>
</html>